package jf.closure;

/**
 * @author ivanalx
 * @date 12.05.2009 15:34:43
 */
public abstract class Closure implements Runnable {

	public Closure andThen(final Closure c) {
		return new Closure() {
			public void run() {
				Closure.this.run();
				c.run();
			}
		};
	}

	public Closure before(final Closure c) {
		return new Closure() {
			public void run() {
				c.run();
				Closure.this.run();
			}
		};
	}
}
